package com.awccis.customer.dao;

import com.awccis.admin.model.sorder.ServiceOrderSimpleBean;
import com.awccis.customer.model.CustomerInfo;
import com.awccis.customer.model.order.OrderBean;
import com.awccis.customer.model.order.OrderInfo;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * @Author: 纯牛奶丶
 * @Date: 2018-04-08 17:54
 * @Since: 1.0
 * @Description:
 **/
@Repository
public interface CustomerOrderDao {
    
    /**
     * 根据距离计算价钱
     * @param distance 距离
     * @return 价钱
     */
    Double callPreGetSum(Double distance);
    
    /**
     * 根据订单号删除订单
     * @param orderInfo orderInfo
     * @return int
     */
    Integer deleteOrderByOrderId(OrderInfo orderInfo);
    
    /**
     * 查询历史订单
     * @param customerInfo
     * @return
     */
    List<OrderBean> selectHistoryOrder(CustomerInfo customerInfo);

    /**
     * 查询当前订单
     * @param hashMap customerPhone
     * @return orderBean
     */
    OrderBean selectCurrentOrder(HashMap<String, String> hashMap);

    List<ServiceOrderSimpleBean> selectDealtServiceOrderById(Integer customerId);

    /**
     * 根据订单号查询对应司机编号
     *
     * @param orderId
     * @return int driverId
     */
    int selectDriverIdByOrderId(int orderId);
}
